/**
 *	\file AKCPPBasicInfoProviderAdapter.mm
 *  
 *  \section desc_sec Description
 *  Description
 *  
 *  \if copyright
 *  	Copyright 2008 Ben Chen. All rights reserved.
 *  \endif
 *  
 *  \section hist_sec Change History:
 *  	-	2/20/08		BC		Created this file
 *  
 *  <hr>
 *  \addtogroup AnimalKingdom
 *  @{
 */

#import "AKCPPBasicInfoProviderAdapter.h"
#import "AbstractClasses.h"

@implementation AKCPPBasicInfoProviderAdapter

- (id)initWithAKCPPBasicInfoProvider:(AKCPPBasicInfoProvider*)basicInfoProvider {
	self = [super init];
	if (self) {
		if (basicInfoProvider == NULL) {
			[[NSException exceptionWithName:NSInvalidArgumentException
									 reason:@"initWithAKCPPBasicInfoProvider: basicInfoProvider is NULL" 
								   userInfo:nil] raise];
		}
		
		model = basicInfoProvider;
	}
	return self;
}

- (void) dealloc
{
	delete model;
	[super dealloc];
}

- (unsigned)numOfCells {
	return model->getNumOfCells();
}

- (unsigned)minNumOfSides {
	return model->getMinNumOfSide();
}

- (unsigned)maxNumOfSides {
	return model->getMaxNumOfSide();
}

- (unsigned)numOfPiecesForSide:(AKSideIndex)sideIndex {
	return model->getNumOfPiecesForSide(sideIndex);
}

@end

/** @} */
